package model;
import java.util.Comparator;

public class Contacts implements Comparable<Contacts> {
	public String fName;
	public String lName;
	public String group;
	public String homeAdd;
	public String compAdd;
	public String personalMobile;
	public String personalLand;
	public String profMobile;
	public String profLand;
	public String homePage;
	public String emailId;
	public String photo;
	public String date;
	
	Contacts(){}

	/**
	 * @return the fName
	 */
	public String getfName() {
		return fName;
	}

	/**
	 * @param fName the fName to set
	 */
	public void setfName(String fName) {
		this.fName = fName;
	}

	/**
	 * @return the lName
	 */
	public String getlName() {
		return lName;
	}

	/**
	 * @param lName the lName to set
	 */
	public void setlName(String lName) {
		this.lName = lName;
	}

	/**
	 * @return the group
	 */
	public String getGroup() {
		return group;
	}

	/**
	 * @param group the group to set
	 */
	public void setGroup(String group) {
		this.group = group;
	}

	/**
	 * @return the homeAdd
	 */
	public String getHomeAdd() {
		return homeAdd;
	}

	/**
	 * @param homeAdd the homeAdd to set
	 */
	public void setHomeAdd(String homeAdd) {
		this.homeAdd = homeAdd;
	}

	/**
	 * @return the compAdd
	 */
	public String getCompAdd() {
		return compAdd;
	}

	/**
	 * @param compAdd the compAdd to set
	 */
	public void setCompAdd(String compAdd) {
		this.compAdd = compAdd;
	}

	/**
	 * @return the personalMobile
	 */
	public String getPersonalMobile() {
		return personalMobile;
	}

	/**
	 * @param personalMobile the personalMobile to set
	 */
	public void setPersonalMobile(String personalMobile) {
		this.personalMobile = personalMobile;
	}

	/**
	 * @return the personalLand
	 */
	public String getPersonalLand() {
		return personalLand;
	}

	/**
	 * @param personalLand the personalLand to set
	 */
	public void setPersonalLand(String personalLand) {
		this.personalLand = personalLand;
	}

	/**
	 * @return the profMobile
	 */
	public String getProfMobile() {
		return profMobile;
	}

	/**
	 * @param profMobile the profMobile to set
	 */
	public void setProfMobile(String profMobile) {
		this.profMobile = profMobile;
	}

	/**
	 * @return the profLand
	 */
	public String getProfLand() {
		return profLand;
	}

	/**
	 * @param profLand the profLand to set
	 */
	public void setProfLand(String profLand) {
		this.profLand = profLand;
	}

	/**
	 * @return the homePage
	 */
	public String getHomePage() {
		return homePage;
	}

	/**
	 * @param homePage the homePage to set
	 */
	public void setHomePage(String homePage) {
		this.homePage = homePage;
	}

	/**
	 * @return the emailId
	 */
	public String getEmailId() {
		return emailId;
	}

	/**
	 * @param emailId the emailId to set
	 */
	public void setEmailId(String emailId) {
		this.emailId = emailId;
	}

	/**
	 * @return the photo
	 */
	public String getPhoto() {
		return photo;
	}

	/**
	 * @param photo the photo to set
	 */
	public void setPhoto(String photo) {
		this.photo = photo;
	}

	/**
	 * @return the date
	 */
	public String getDate() {
		return date;
	}

	/**
	 * @param date the date to set
	 */
	public void setDate(String date) {
		this.date = date;
	}
	
	public Contacts(String fName,String lName, String group, String homeAdd, String compAdd, String personalMobile, String personalLand, String profMobile, String profLand, String homePage, String emailId, String photo, String date){
	this.fName=fName;
	this.lName=lName;
	this.group=group;
	this.homeAdd=homeAdd;
	this.compAdd=compAdd;
	this.personalMobile=personalMobile;
	this.personalLand=personalLand;
	this.profMobile=profMobile;
	this.profLand=profLand;
	this.homePage=homePage;
	this.emailId=emailId;
	this.photo=photo;
	this.date=date;
	}
	
	@Override
    public int compareTo(Contacts c) {
        //let's sort the employee based on id in ascending order
        //returns a negative integer, zero, or a positive integer as this employee id
        //is less than, equal to, or greater than the specified object.
        return (this.group.compareTo(c.group));
    }
	
	/**
     * Comparator to sort Contacts list or array in order of Name
     */
    public static Comparator<Contacts> NameComparator = new Comparator<Contacts>() {
 
        @Override
        public int compare(Contacts e1, Contacts e2) {
            return e1.getfName().compareTo(e2.getfName());
        }
    };
	
	
	
	
	
		

}
